package com.iafme.dto.res;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author summer
 * @version 1.0
 * @date 2025/4/15 15:12
 */
@Data
@SearchBean(tables = "iafme_redemption r",orderBy = "r.createTime DESC")
public class RedemptionResDTO implements Serializable {

    @DbField("r.code")
    private String code;

    @DbField("r.createTime")
    private LocalDateTime createTime;

    @DbField("CASE WHEN r.status=0 THEN '未使用' WHEN r.status=1 THEN '已兑换' ELSE '已过期' END")
    private String statusName;
}
